<?php
// +----------------------------------------------------------------------
// | @filename AuthController.php
// +----------------------------------------------------------------------
// | @author 落花轻舞问君愁 <mwcx1990@qq.com>
// +----------------------------------------------------------------------
// | @datetime 2021-10-27 15:25:18
// +----------------------------------------------------------------------
// | @Description
// +----------------------------------------------------------------------

namespace Addons\Backend\Http\Requests\Auth;

use Addons\Backend\Http\Requests\BaseRequest;

class LoginRequest extends BaseRequest
{
    public function rules(): array
    {
        return [
            'username' => ['bail', 'required'],
            'password' => ['bail', 'required'],
        ];
    }

    public function messages(): array
    {
        return [
            'username.required' => '请输入账号',
            'password.required' => '请输入密码'
        ];
    }

    public function authorize(): bool
    {
        return true;
    }
}
